package com.niiwoo.civet.trade.service.cardniu;

import com.niiwoo.civet.trade.dto.common.CardNiuLoanResult;
import com.niiwoo.civet.trade.dto.common.ProjectSummaryDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.CardNiuLoanCreditAmountDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.CardniuLoanConfigDTO;

import java.math.BigDecimal;

/**
 * 卡牛借款服务
 * Created by dell on 2018/2/24.
 * Description：civet-app
 */
public interface CardNiuLoanDubboService {

    /**
     * 获取卡牛的授信额度
     * @param userId
     * @return
     */
    CardNiuLoanCreditAmountDTO getCardNiuLoanCreditAmount(String userId);

    /**
     * 获取卡牛借款配置信息
     * @param userId
     * @return
     */
    CardniuLoanConfigDTO getCardniuLoanConfig(String userId);

    /**
     * 卡牛借款成功前的数据
     * @param userId
     * @param projectId
     * @return
     */
    CardNiuLoanResult getLoanBeforeSuccess(String userId, Long projectId);


    /**
     * 借款订单查询
     * @param projectId
     * @param userId
     * @return
     */
    default void queryLoanOrder(Long projectId, String userId){
        throw new UnsupportedOperationException("");
    }

    /**
     * 查询标的summary信息 for 卡牛
     * @param projectId
     * @return
     */
    default ProjectSummaryDTO querySummaryInfoByProjectId(Long projectId){
        throw new UnsupportedOperationException("");
    }

    /**
     * 获取用户可用授信额度
     * @param userId
     * @return
     */
    default BigDecimal getCardNiuUsedCredit(String userId){
        throw new UnsupportedOperationException("");
    }
}
